﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _010_011_012操作符详解_6_
{
    internal class Program
    {
        static void Main(string[] args)
        {
            uint x = uint.MaxValue;
            Console.WriteLine(x);  //4294967295
            string binStr = Convert.ToString(x, 2);
            checked
            {
                Console.WriteLine(binStr);//11111111111111111111111111111111
                try
                {
                    uint y = x + 1;
                    Console.WriteLine(y); //此时y=0 应为二进制数进1后 32位全为0  33位应该舍去  所以为0
                }
                catch (OverflowException ex)
                {
                    Console.WriteLine("有溢出产生了");

                }
            }
           
          

        }
    }
}
